1. Field of the Invention
The present invention relates to a white balance method and an apparatus thereof, and more particularly to the white balance method and apparatus that divide an image into a plurality of windows, and then analyze image data of each window to reduce a color white misjudgment in a scene.
2. Description of Related Art
As digital cameras are introduced continuously, image sensors such as a charge-coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) sensor play an important role, since the image sensor cannot distinguish the colors of external environment, and thus the digital cameras generally perform a white balance process during image preview or image capture.
In general, the color of light reflected from an object depends on the color of the light source, our brain is able to detect and correct such a color change, so that we can see the existence of a white object regardless of observing conditions such as under the sun, in a rainy day, or with indoor fluorescent light. However, sensing devices cannot distinguish the colors of the external ambient lights, so the color of the observed white object detected by the sensing devices varies with different light sources, some are slightly yellow or red, and some are slightly blue. To produce an image that is closer to human vision, digital cameras generally adjust the color according to the detected light source, so that the white color that can be seen by the human eye can be observed in the final image, this adjustment is called white balance process.
In traditional white balance technology, when the camera faces a scene with a blue sky and this blue sky background is included within the range of analyzing the white balance of the image of the scene, a huge quantity of image data of blue color with a high color temperature will be used for analyzing the white balance, such that after the image goes through the white balance process, the corrected image will have a color with a color temperature lower than that of the original entered image.
Therefore, conventional technology proposes a method of dividing the entered image into a plurality of windows, and then performs a color white identification of image data in each divided window, and imposes a stricter limitation to the image data of positions on the top part of the entered image and on the white pixel detection range of images with a high color temperature, so that high color temperature pixels are excluded from the analysis of for white pixel detection to avoid misjudgment occurring during the white balance process of a scene with a large piece of blue sky. As a result, the white balance result can show a user's expected outstanding blue color.
However, the conventional white balance analysis and correcting method that divides the images only emphasizes on the upper and lower positional in relation to the windows and uses the color temperature value to limit the color white detection range. However this method neglects the overall picture content and also does not perform further analysis on the image light source. In other words, when the windows disposed on the upper part of an image are mostly images with a high color temperature, the continuity of each divided window still have to be considered to accurately determine whether the current scene is an outdoor blue sky scene in order to avoid a misjudgment of an entered image with a plurality of objects with a high color temperature disposed on its upper area and also avoid possible deviations or errors of the white balance correction result.
In addition, the prior art limits the color white detection range of the image data falling within the divided range based on the position of each window. In special situations where there are no color white information in the window that can be used for white color identification, a deviation or error of the white balance correction result may result.
In view of the aforementioned problems of the prior art, the present invention divides a captured image into a plurality of windows, and then the image data, light source and position of each window are analyzed to perform a white balance method, so as to overcome the drawback of the conventional white balance technology effectively.